<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 对折纸挑战，每次对折，纸张的厚度变为原来的两倍，在不考虑难度的情况下，一张普通的0.0001米厚度的纸，多少次对折后，可以达到最高峰珠穆拉玛峰的高度8848米？
        var z = 0.0001;
        for (var m = 0; z < 8488; m++) {
            z = z * 2
        }
        console.log(m);
        var h = 0.0001;

        var count = 0;
        while (h < 8848) {
            h *= 2;
            count++;
        }
        console.log(count);
        // 一个物体从1000米高的地方落下，每次弹起的高度是前一次高度的0.6倍，问多少次之后，高度小于1米。
        var paper = 1000;
        for (var count = 0; paper > 1; count++) {
            paper = paper * 0.6;
        }
        console.log(count);

        var h = 1000;
        var count = 0;
        while (h > 1) {
            h = h * 0.6
            count++;
        }
        console.log(count);

        var a = 0.0001;
        for(var i = 0; a<8848;i++){
            a = a*2
        } 
        console.log('a===》',i);
        // 双重for循环，打印一个99乘法表
        var sum = '';
        for (var i = 1; i <= 9; i++) {
            for (var j = 1; j <= i; j++) {
                sum += j + '*' + i + '=' + i * j + '\t'
            }
            sum += '\n'
        }
        console.log(sum);

        var num = '';
        for (var a = 1; a <= 10; a++) {
            for (var b = 1; b <= a; b++) {
                num += '⭐'
            }
            num += '\n'
        }
        console.log(num);
        var sum = ''; 
        for(var i = 1;i <=9; i++){ 
            for (j = 1; j <= i; j++) { 
                sum += j + '*' + i + '=' + i * j + '\t'; 
            } 
            sum += '\n';
         } 
         console.log('乘法表===',sum)
    </script>
</body>

</html>